/*
 * MutableTreeNode.java  0.4.0 / Oct 25, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing.tree;

/**
 * Mutable Tree Node Interface.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public interface MutableTreeNode extends TreeNode {

  /**
   * Inserts specified child at specified index.
   *
   * @param child the child
   * @param index the index
   */
  public void insert(MutableTreeNode child, int index);

  /**
   * Removes child at the specified index.
   *
   * @param index the index
   */
  public void remove(int index);

  /**
   * Removes specified node.
   *
   * @param node the node
   */
  public void remove(MutableTreeNode node);

  /**
   * Sets the parent of the node.
   *
   * @param parent the new parent
   */
  public void setParent(MutableTreeNode parent);

  /**
   * Removes the node form its parent.
   */
  public void removeFromParent();

  /**
   * Sets user object.
   *
   * @param object the object
   */
  public void setUserObject(Object object);

}
